home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / tex / archives / pbmtopk.lzh / pbmtopk / src / amiga.diff next >
Text File  |  1992-05-16  |  2KB  |  74 lines

  1. Small note: The max -> max1 change in pbmtopk.c is a workaround for a minor
  2. DICE cpp bug (a macro `max(something)' prevents the use of a variable `max').
  3.  
  4.  
  5. *** pbmtopk.c.orig      Tue May 12 19:43:04 1992
  6. --- pbmtopk.c   Sat May 16 04:20:13 1992
  7. ***************
  8. *** 8,14 ****
  9. --- 8,21 ----
  10.   #include <pbm.h>
  11.   #include <ctype.h>
  12.  
  13. + #ifdef A_FORCEPROTO
  14. + #undef A_FORCEPROTO
  15. + /* This source is a complete mess.  It looks like a direct Pascal->C
  16. +    conversion. I don't even want to try to fully prototype it.
  17. +    I would end up changing half the stuff. */
  18. + #else /* A_FORCEPROTO */
  19.   extern double atof();
  20. + #endif /* A_FORCEPROTO */
  21.  
  22.   #define MAXPKCHAR 256
  23.   #define MAXOPTLINE 200
  24. ***************
  25. *** 126,139 ****
  26.   #define add_tfmitalic(v) (add_tfmtable(italictab, &numitalic, v, MAXITALICTAB,\
  27.                                        "Italic correction"))
  28.   byte
  29. ! add_tfmtable(table, count, value, max, name)
  30. !      integer *table, *count, value, max;
  31.        char *name;
  32.   {
  33.     integer i;
  34.     for (i = 0; i < *count; i++) /* search for value in tfm table */
  35.       if (table[i] == value) return (byte)i;
  36. !   if (*count >= max) {
  37.       fprintf(stderr, "Too many values in %s table!\n", name) ;
  38.       jumpout();
  39.     }
  40. --- 133,146 ----
  41.   #define add_tfmitalic(v) (add_tfmtable(italictab, &numitalic, v, MAXITALICTAB,\
  42.                                          "Italic correction"))
  43.   byte
  44. ! add_tfmtable(table, count, value, max1, name)
  45. !      integer *table, *count, value, max1;
  46.        char *name;
  47.   {
  48.     integer i;
  49.     for (i = 0; i < *count; i++) /* search for value in tfm table */
  50.       if (table[i] == value) return (byte)i;
  51. !   if (*count >= max1) {
  52.       fprintf(stderr, "Too many values in %s table!\n", name) ;
  53.       jumpout();
  54.     }
  55. *** pktopbm.c.orig      Tue May 12 19:42:14 1992
  56. --- pktopbm.c   Sat May 16 04:12:31 1992
  57. ***************
  58. *** 360,366 ****
  59.         }
  60.         }
  61.         filename[car] = NULL;
  62. !       pbm_writepbm(fp, bitmap, cwidth, cheight) ;
  63.         pbm_freearray(bitmap, cheight) ;
  64.         if (fp != stdout) (void)fclose(fp) ;
  65.       }
  66. --- 360,366 ----
  67.           }
  68.         }
  69.         filename[car] = NULL;
  70. !       pbm_writepbm(fp, bitmap, cwidth, cheight, 0) ;
  71.         pbm_freearray(bitmap, cheight) ;
  72.         if (fp != stdout) (void)fclose(fp) ;
  73.       }
  74.